﻿$(document).ready(function() {
    var GT = $("#HFGT").val();
    if (GT == 0 || GT == null) {
        $("#BtnCkeckOut").hide()
        //$("#BtnEmptyCart").hide();
    }
    
    $("#BtnCheckOut").click(function() {
        if (GT >= 150 || (!GT == null)) {
            window.parent.$("#ASEiFrame").css({ "width": "1020px" });
            window.parent.$("#Holder").hide();
            //alert("KKKKK");
            window.parent.$("#ASEiFrame").attr({ "src": "FullCart.aspx" });
        }
        else {
            alert("Sorry minimum order amount is  Rs. 150");
        }
    });
    $("#BtnPlanCheckOut").click(function() {
        var Mode;
        var SubMode;
        switch (window.parent.$("#DdlPlanner").prop("selectedIndex")) {
            case 0:
                break;
            case 1:
                Mode = 0;
                break;
            case 2:
                Mode = 10 + window.parent.$("#DdlWeeklyDay").prop("selectedIndex");
                break;
            case 3:
                Mode = 200 + window.parent.$("#DdlMonthlyDay").prop("selectedIndex");
                break;
            default:
                alert("You have not selected any plan");
        }
        parent.window.location = "FullPlanCart.aspx?PID=" + Mode
        //alert(Mode);
    });
});